package com.example.untils;

import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSender;

public class MailUntils {

    public static SimpleMailMessage sendMail(String receive,String sb) {
        SimpleMailMessage message=new SimpleMailMessage();   //发送简单邮件对象
        message.setFrom("1095322098@qq.com"+"(阿尔托利雅)");   //发送人,括号中的内容将替换显示的邮箱账号
        message.setTo(receive);      //接收人
        message.setSubject("阿尔托利雅给的验证码");      //标题
        message.setText("这是您的验证码（"+sb+"）请勿告诉他人！，本验证码将仅生效2分钟，请尽快使用");   //正文
        return message;
    }
}
